package com.freestyle.seatabusiness.account.service;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;

/**
 * Created by rocklee on 2021/12/31 12:18
 */
@Configuration
public class ContextUtil implements ApplicationContextAware {
  private static ApplicationContext applicationContext;
  @Override
  public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
    this.applicationContext=applicationContext;
  }

  public static ApplicationContext getApplicationContext() {
    return applicationContext;
  }
}
